The binary encoding scheme is commonly used in modern bar code symbology design. Binary codes (such as Code 39) define the set of bar/space patterns making up its “language” or bar code character set using only two choices (“wide” or “narrow”) for each bar and space of each pattern. The wide:narrow ratio can be selected when printing each bar code. Selecting a 2:1 ratio creates a more compact bar code; a 2.5:1 or 3:1 ratio makes the bar code wider, but also makes it easier for the scanner to distinguish wide elements from narrow ones, which is helpful when printing on rough cardboard, for example.
Printed barcodes that have been converted to a different dots per inch (DPI) density typically have issues with readability due to dot gain and the scaling method. For instance, printer dot gain increases bar widths by producing bars that are too wide while making spaces too small, thus decreasing the readability of bar codes.
Compensation for dot gain is typically performed at the device DPI by removing one or more pels from the binary bar code data. However, removal of pels to compensate for dot gain is very coarse. Further, conversion of the modified binary barcode data to a different DPI is typically done using nearest neighbor scaling. This conversion method creates distortion of the bars and poor readability. If the scaling ratio is non integer this results in distorted bar and space sizes. Combined, these issues create poor barcode readability. Additionally, the variability in bar sizes due to the scaling further reduces barcode readability.
Accordingly, a mechanism for scaling barcode data to improve readability is desired.